package com.doyambean.springcloud.consul.serverdemo.controller;


import com.doyambean.springcloud.consul.serverdemo.service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * controller 层，对外发布。
 *
 * @author: xuchl
 * @date:20200217
 */
@RestController
@RequestMapping("/serverdemo")
public class DemoController {

    @Autowired
    private DemoService demoService;

    @GetMapping("/do")
    public String doDemo() {

        return demoService.demo();

    }
}
